<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1,
        .box2 {
            display: flex;
            justify-content: space-around;
        }
        
        .jia,
        .jian {
            width: 20px;
            height: 20px;
            background-color: antiquewhite;
            margin: 10px;
            text-align: center;
            line-height: 20px;
        }
        
        input {
            width: 30px;
            height: 30px;
        }
    </style>
</head>

<body>
    <div class="box1">
        <p>华为手机</p>
        <p>￥ <span>3000</span></p>
        <div class="box2">
            <input type="text" value="0" disabled>
            <span>台</span>
            <button class="jia">+</button>
            <button class="jian">-</button>
        </div>
    </div>
    <div class="box1">
        <p>OPPO手机</p>
        <p>￥<span>2000</span></p>
        <div class="box2">
            <input type="text" value="0" disabled>
            <span>台</span>
            <button class="jia">+</button>
            <button class="jian">-</button>
        </div>
    </div>
    <div class="box1">
        <p>苹果手机</p>
        <p>￥<span>5000</span></p>
        <div class="box2">
            <input type="text" value="0" disabled>
            <span>台</span>
            <button class="jia">+</button>
            <button class="jian">-</button>
        </div>
    </div>
    <p>共选择 <span class="span1">0</span> 总计<span>0</span>元 </p>
    <script>
        let inp = document.querySelectorAll("input")
        let btn1 = document.querySelectorAll(".jian")

        inp.forEach(function(v) {
            if (v.value == 0) {
                btn1.forEach(function(x) {
                    x.style
                });
            }
        });
    </script>
</body>

</html>